package com.xyxeshang.es.music.backend.service;

import com.xyxeshang.es.music.backend.entity.Playlist;
import com.xyxeshang.es.music.backend.util.ResultUtil;
import org.apache.ibatis.jdbc.Null;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author xyx-Eshang
 */
public interface PlaylistService {

	/**
	 * 创建歌单
	 *
	 * @param request
	 * @param playlistName
	 * @param playlistIntroduction
	 * @param playlistPictureUrl
	 * @param playlistLabelContentArr
	 * @return
	 */
	ResultUtil<Integer> createPlaylist(HttpServletRequest request, String playlistName, String playlistIntroduction, String playlistPictureUrl, String[] playlistLabelContentArr);

	/**
	 * 修改歌单
	 *
	 * @param playlistId
	 * @param playlistName
	 * @param playlistIntroduction
	 * @param playlistPictureUrl
	 * @param playlistLabelContentArr
	 * @return
	 */
	ResultUtil<Null> updatePlaylist(Integer playlistId, String playlistName, String playlistIntroduction, String playlistPictureUrl, String[] playlistLabelContentArr);

	/**
	 * 新增歌曲到歌单中
	 *
	 * @param playlistId
	 * @param songId
	 * @return
	 */
	ResultUtil<Null> addSong(Integer playlistId, String songId);

	/**
	 * 从歌单中移除歌曲
	 *
	 * @param playlistId
	 * @param songId
	 * @return
	 */
	ResultUtil<Null> deleteSong(Integer playlistId, String songId);

	/**
	 * 点赞歌单
	 *
	 * @param request
	 * @param playlistId
	 * @return
	 */
	ResultUtil<Null> addLike(HttpServletRequest request, Integer playlistId);

	/**
	 * 添加歌单评论
	 *
	 * @param request
	 * @param playlistCommentContent
	 * @param playlistId
	 * @return
	 */
	ResultUtil<Integer> addComment(HttpServletRequest request, String playlistCommentContent, Integer playlistId);

	/**
	 * 查询我创建的歌单
	 *
	 * @param request
	 * @return
	 */
	ResultUtil<List<Playlist>> listMine(HttpServletRequest request);

	/**
	 * 查询我点赞过的歌单
	 *
	 * @param request
	 * @return
	 */
	ResultUtil<List<Playlist>> listMyLike(HttpServletRequest request);

	/**
	 * 根据id查询
	 * @param playlistId
	 * @return
	 */
	ResultUtil<Playlist> getById(Integer playlistId);
}
